package com.cskaoyan.controller;

import com.cskaoyan.bean.VO.WxSearchVo;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.service.WxSearchService;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description:搜索
 * @author:刘杰
 * @create: 2022-08-17 11:18
 */
@RestController
@RequestMapping("wx/search")
public class WxSearchController {

    @Autowired
    WxSearchService wxSearchService;

    /**
     *显示
     * @return
     */
    @RequestMapping("index")
    public BaseRespVo index(){
        WxSearchVo wxSearchVo = wxSearchService.index();
        return BaseRespVo.ok(wxSearchVo);
    }

    @RequestMapping("helper")
    public BaseRespVo helper(String keyword){
        List<String> list = wxSearchService.helper(keyword);
        return BaseRespVo.ok(list);
    }

}
